import cv2
import numpy as np

def crop_image(image_path, xyxy):
    image = cv2.imread(image_path)
    x1, y1, x2, y2 = xyxy
    cropped_image = image[y1:y2, x1:x2]
    # cv2.imwrite('cropped_image.png', cropped_image) 
    return cropped_image
